#include "stdafx.h"
#include "atlcom.h"

[ 
	module ( 
   type=exe, 
   name="memleak", 
   version="1.0", 
   uuid="71FA2163-DC3D-42C7-A3DD-57D1F067AE89", 
   helpfile="memleak", 
  ) 
];


[
	object,
	uuid("6814F218-5165-41A8-B56C-36177BE009E6"),
	pointer_default(unique)
]


__interface IComLeakTester: public IUnknown
{
	public:
		virtual HRESULT Leak() = 0;
};

[
	//object,
    default(IComLeakTester),
    threading(free),
    uuid("489E06E6-83C7-4103-8948-C3D37B589A3D"),
    coclass
]

class ComLeakTester
	:public CComObjectRoot,public IComLeakTester
{

public:
	ComLeakTester();
	
	BEGIN_COM_MAP(ComLeakTester)
		COM_INTERFACE_ENTRY(IComLeakTester)
	END_COM_MAP()
	void FinalRelease();
	STDMETHOD( Leak());
private:
	//long m_dwRef;
	unsigned char* buffer;
};